/**********************************************************************************************************************
 *
 * Project:    mGameEngine
 * File:       directionallight.h
 * Author:     karooolek
 * Created on: 2009-03-27
 *
 **********************************************************************************************************************/

#ifndef DIRECTIONALLIGHT_H_
#define DIRECTIONALLIGHT_H_

#include "ambientlight.h"

namespace mGameEngine
{
namespace Graphics
{

/**
 * Directional light.
 */
class DirectionalLight : public AmbientLight
{
protected:
    /**
     * Direction.
     */
    Vector3 _direction;

    /**
     * Diffuse color
     */
    Color _diffuse;

    /**
     * Specular color
     */
    Color _specular;

public:
    /**
     * Create new directional light.
     */
    DirectionalLight();

    /**
     * Create new directional light with specified colors and direction.
     * @param ambient ambient light color
     * @param diffuse diffuse light color
     * @param specular specular light color
     * @param direction direction.
     */
    DirectionalLight(const Color &ambient, const Color & diffuse,
            const Color & specular,
            const Vector3 &direction = Vector3(1.0f, 0.0f, 0.0f));

    /**
     * Destroy directional light.
     */
    virtual ~DirectionalLight();

    /**
     * Get directional light direction.
     * @return directional light direction.
     */
    const Vector3 &getDirection() const
    {
        return _direction;
    }

    /**
     * Set directional light direction.
     * @param direction direction.
     */
    void setDirection(const Vector3 &direction)
    {
        _direction = direction;
    }

    /**
     * Get directional light diffuse color.
     * @return diffuse light color
     */
    const Color &getDiffuseColor() const
    {
        return _diffuse;
    }

    /**
     * Set directional light diffuse color.
     * @param diffuse light color
     */
    void setDiffuseColor(const Color &diffuse)
    {
        _diffuse = diffuse;
    }

    /**
     * Get directional light specular color.
     * @return specular light color
     */
    const Color &getSpecularColor() const
    {
        return _specular;
    }

    /**
     * Set directional light specular color.
     * @param specular light color
     */
    void setSpecularColor(const Color &specular)
    {
        _specular = specular;
    }

    /**
     * Set directional light on graphics scene.
     * @param l light identifier
     */
    virtual void set(uint l) const;
};

}
}

#endif // DIRECTIONALLIGHT_H_
